 <html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
        <meta name="layout" content="main" /> 
        <ofchart:resources/>
        <script language="JavaScript">
        <!--
$(function(){ 
    $(".changeChart").click(function(){   
        $.get("../passPieChart/${exam?.id}",{'order' : this.id} ,
        function(data){ 
            document.getElementById('demo-chart').load(data);
        }); 
    });
});
        //-->
        </script>
    </head>
    <body>
        <g:set var="entityName" value="${message(code: 'teacherAttendance.label', default: 'TeacherAttendance')}" />
        <div class="body">
            <h1>${exam}及格率</h1>
            <g:if test="${flash.message}">
            <div class="message">${flash.message}</div>
            </g:if>
        <div class="nav">
            <a href="javascript:void(0);" id="pass" class="changeChart">只统计及格率</a>
            <a href="javascript:void(0);" class="changeChart">统计及格率和优秀率</a>
        </div>
            <div class="dialog">
                <table>
                    <tbody> 
                        <tr > 
                            <td valign="top" >
                            <ofchart:chart name="demo-chart" url="${createLink(action:'passPieChart',id : exam?.id)}" width="700" height="400"/>
                            </td> 
                        </tr> 
                    </tbody>
                </table>
            </div>
            <div class="buttons">
                 <g:form>
                     <span class="button"><g:actionSubmit class="edit" action="list" value="${message(code: 'default.return.label', default: 'return')}" /></span>
                 </g:form>
            </div>
        </div>
    </body>
</html>
